package com.zmm.myyimixian.config;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * Created by wencai2015 on 2016/10/21.
 */

public class ConfigPath {
    public static final String HOME_PATH = "http://api.1mxian.com/v5/home_page?token=&longitude=116.30565351053349&latitude=40.15264674179405&poi_id=bd-00f1c7fb920aa21cc056ac2b&coord_system=BD-09&delivery_mode=9";
    public static final String HOME_LB_S = "http://7sbnc0.com2.z0.glb.qiniucdn.com/material/";
    public static final String HOME_LB_X = "?imageView2/2/w/900";
    public static final String HOME_LIST_S = "http://api.1mxian.com/v4/goods/";
    public static final String HOME_LIST_X = "/show?store_id=227&token=8ea6013f2a688eaf01ecf8c82a9476df&delivery_mode=9";

    //图片
    public static String getLunBoPath(String imagePath) {
        return HOME_LB_S + imagePath + HOME_LB_X;
    }

    //得到ListViewActivity界面的json
    public static String getListActivity(String bh) {
        return HOME_LIST_S + bh + HOME_LIST_X;
    }

    //搜索界面的path头部
    public static final String SEARCH_PATH_HEAD = "http://api.1mxian.com/v5/search?store_id=227&token=&key_word=";
    //搜索界面的path尾部
    public static final String SEARCH_PATH_BEHIND = "&page=0&delivery_mode=9";

    //获取搜索界面的path
    public static String getSearchPath(String value) {
        try {
            return SEARCH_PATH_HEAD + URLEncoder.encode(value, "UTF-8") + SEARCH_PATH_BEHIND;
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }


    public static final String FENLEI_TITLE = "http://api.1mxian.com/v5/categories?poi_id=bd-00f1c7fb920aa21cc056ac2b&longitude=116.30565351053349&latitude=40.15264674179405&delivery_mode=9";
    public static final String FENLEI_TITLE_ITEM_S = "http://api.1mxian.com/v5/categories/";
    public static final String FENLEI_TITLE_ITEM_X = "/goods?store_id=227&token=&delivery_mode=9";

    //得到不同水果列表的路径
    public static String getFLTitlePath(String id) {
        return FENLEI_TITLE_ITEM_S + id + FENLEI_TITLE_ITEM_X;
    }


    public static final String ME_ACCOUNT = "http://x.1mxian.com/rechargeCard?token=8ea6013f2a688eaf01ecf8c82a9476df";
    public static final String ME_COUPON = "http://x.1mxian.com/bonus/inactive?token=8ea6013f2a688eaf01ecf8c82a9476df";
    public static final String ME_INTEGRAL = "http://x.1mxian.com/creditGoods?token=8ea6013f2a688eaf01ecf8c82a9476df";
    public static final String ME_VIP = "http://x.1mxian.com/vipIntro?token=8ea6013f2a688eaf01ecf8c82a9476df";
    public static final String ME_INVITE = "http://x.1mxian.com/customer/current/invitation?token=8ea6013f2a688eaf01ecf8c82a9476df";
    public static final String ME_MALL = "http://x.1mxian.com/creditGoods?token=8ea6013f2a688eaf01ecf8c82a9476df";
    public static final String ME_QIYE = "http://x.1mxian.com/enterprise/index?token=8ea6013f2a688eaf01ecf8c82a9476df";
    public static final String ME_KEFU = "http://x.1mxian.com/customerService/index?token=8ea6013f2a688eaf01ecf8c82a9476df";
    public static final String ME_SHOUHOU = "http://x.1mxian.com/customerService/jiService?token=8ea6013f2a688eaf01ecf8c82a9476df";

    public static final String HOME_BOOS_S = "http://api.1mxian.com/v5/special_list?token=&store_id=227&special_id=";
    public static final String HOME_BOOS_X = "&delivery_mode=9";

    //得到每个childfragment的网子
    public static String getHomeBoos(String special_id) {
        return HOME_BOOS_S + special_id + HOME_BOOS_X;
    }
}
